package com.heima.homeservicemanagementsystem.mapper;

import java.util.List;

import com.heima.homeservicemanagementsystem.entity.SysPermission;
import com.heima.homeservicemanagementsystem.entity.SysRole;
import com.heima.homeservicemanagementsystem.entity.dto.Option;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.heima.homeservicemanagementsystem.entity.SysUser;

/**
 * 用户表(SysUser)表数据库访问层
 *
 * @author makejava
 * @since 2025-02-26 22:55:17
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
    List<Option> getRolesByUserId(@Param("userId") String id);

    void insertRolesIds(@Param("userId") String userId, @Param("rolesIds") List<Object> rolesIds);

    void deleteByUserId(@Param("userId") String userId);

    List<String> getRoleCodeById(@Param("userId") String userId);

    List<String> listPermssionByRoleCode(@Param("roleCode") String roleCode);

    List<SysPermission> listparentMenuByuserId(@Param("userId") String userId);

    List<SysPermission> listMenuByuserId(@Param("userId") String userId, @Param("parentId") String parentId);


    List<SysRole> getuserRoles(@Param("userId") String userId);

    List<SysPermission> ressyspressionByid(String id);
}